1. Technical Field
The present invention relates to a timer device and an electronic apparatus.
2. Related Art
A timer IC (Integrated Circuit) is an IC that measures time set in advance and outputs measurement completion signals when the measurement is completed, and used for various applications. A system can be configured in which, when, for example, a CPU (Central Processing Unit) is set to be in asleep mode in order to reduce power consumption and then, after a predetermined time elapses, a predetermined calculation process has to be performed by activating the CPU, a measurement completion signal output by a timer IC after measuring the predetermined time is input to the CPU as an interrupt signal, the CPU receives the interrupt signal, and accordingly the predetermined calculation process is performed.
JP-A-3-250226 is an example of the related art.
Two methods are considered as a method of setting a measurement time of the timer IC. One setting method is to write a set value of a measurement time in an internal register via an external terminal for a serial interface (a serial clock terminal, a serial data terminal, or the like) of a timer IC, and the other setting method is to set a measurement time directly in a plurality of external terminals of a timer IC. The former setting method may use a small number of terminals for setting the timer IC and is advantageous in terms of low cost since an inexpensive package can be selected. However, when the timer IC is mounted in a vehicle, for example, the device is required to have high reliability, but due to an effect of noise resulting from an engine, or the like, or due to a bug in a program used to write a set value, there is a concern that an incorrect set value will be written, which may impair the reliability thereof. Therefore, when high reliability is required, the latter setting method is effective, but a number of terminals for setting of the timer IC have to be secured. For this reason, when low cost is required, it is necessary to reduce the number of terminals other than terminals for setting to be as low as possible so as to use an inexpensive package.
On the other hand, as methods of using a timer IC, a single mode in which measurement is performed only once and a repeat mode in which measurement is repeatedly performed in a fixed cycle are considered, and thus, a timer IC that can correspond to both the single mode and the repeat mode is required. In order to correspond to the requirement, a dedicated external terminal for selecting a single mode or a repeat mode may be provided in a timer IC, but as described above, there are cases in which there are no terminals to spare, or in which it is difficult to assign a dedicated external terminal.